/*
 * @Description: 渠道商接口
 * @Date: 2022-12-06 23:18:31
 * @Author: lizhiqiang
 */
import { ChannelProvider } from "@/types/api";
import { get, post } from "../utils/request"
// 获取渠道商列表
export const GetChannelProviderList =(params:ChannelProvider)=>post('/cdwl-merchant/inner/channelprovider/list',params);
// 获取渠道商详情
export const GetChannelProviderInfo = (id:string)=>get(`/cdwl-merchant/inner/channelprovider/info/${id}`);
// 保存渠道商
export const SaveChannelProvider=(params:ChannelProvider)=>post("/cdwl-merchant/inner/channelprovider/save",params);
// 编辑渠道商
export const UpdateChannelProvider=(params:ChannelProvider)=>post("/cdwl-merchant/inner/channelprovider/update",params);
// 渠道商审核
export const AuditChannelProvider=(params:ChannelProvider)=>post("/cdwl-merchant/inner/channelprovider/examine",params);
// 根据渠道商编号获取渠道商详情
export const GetChannelProviderInfoByCode =(code:string)=>get(`/cdwl-merchant/inner/channelprovider/getByCode/${code}`);
// 删除渠道商
export const DelChannelProvider = (params:Array<string>)=>post('/cdwl-merchant/inner/channelprovider/deleteBatch',params)
// 批量提审
export const ReferralChannelProvider = (params:Array<string>)=>post('/cdwl-merchant/inner/channelprovider/initiateReview',params)

// 获取渠道商下拉列表
export const getChannelProviderOptions =(params: any)=>post('/cdwl-merchant/merchant/api/channelList',params);
